package com.oceansoft.mobile.biz.front.entity;

import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.Date;

import org.springframework.jdbc.core.RowMapper;

/**
 * 文章实体
 * @author Administrator
 *
 */
public class BasesiteArticleNews {
	private long sid;
	private String title;
	private String description;
	private String picCover;
	private String content;
	private long mer_id;
	private long channel_id;
	private Date updateTime;
	private int status;
	
	 private String photos;
	
	private String channelName;
	
	public BasesiteArticleNews() {
		super();
	}

	public BasesiteArticleNews(long sid, String title, String description,
			String picCover, String content, long mer_id, long channel_id,
			Date updateTime, int status) {
		super();
		this.sid = sid;
		this.title = title;
		this.description = description;
		this.picCover = picCover;
		this.content = content;
		this.mer_id = mer_id;
		this.channel_id = channel_id;
		this.updateTime = updateTime;
		this.status = status;
	}





	public static RowMapper<BasesiteArticleNews> getFullRowMapper() {
        return new RowMapper<BasesiteArticleNews>() {
            @Override
            public BasesiteArticleNews mapRow(ResultSet rs, int index) throws SQLException {
            	BasesiteArticleNews obj = new BasesiteArticleNews();
                obj.setSid(rs.getLong("sid"));
                obj.setTitle(rs.getString("title"));
                obj.setDescription(rs.getString("description"));
                obj.setPicCover(rs.getString("picCover"));
                obj.setContent(rs.getString("content"));
                obj.setMer_id(rs.getLong("mer_id"));
                obj.setChannel_id(rs.getLong("channel_id"));
                obj.setStatus(rs.getInt("status"));
                obj.setUpdateTime(rs.getTimestamp("updateTime"));
                obj.setChannelName(rs.getString("channelName"));
                return obj;
            }
        };
    }
	public static RowMapper<BasesiteArticleNews> getFullRowMapper2() {
        return new RowMapper<BasesiteArticleNews>() {
            @Override
            public BasesiteArticleNews mapRow(ResultSet rs, int index) throws SQLException {
            	BasesiteArticleNews obj = new BasesiteArticleNews();
                obj.setSid(rs.getLong("sid"));
                obj.setTitle(rs.getString("title"));
                obj.setDescription(rs.getString("description"));
                obj.setPicCover(rs.getString("picCover"));
                obj.setContent(rs.getString("content"));
                obj.setMer_id(rs.getLong("mer_id"));
                obj.setChannel_id(rs.getLong("channel_id"));
                obj.setStatus(rs.getInt("status"));
                obj.setUpdateTime(rs.getTimestamp("updateTime"));
                return obj;
            }
        };
    }
	public static RowMapper<BasesiteArticleNews> getFullRowMapper3() {
		return new RowMapper<BasesiteArticleNews>() {
			@Override
			public BasesiteArticleNews mapRow(ResultSet rs, int index) throws SQLException {
				BasesiteArticleNews obj = new BasesiteArticleNews();
				obj.setSid(rs.getLong("sid"));
				obj.setTitle(rs.getString("title"));
				obj.setDescription(rs.getString("description"));
				obj.setPicCover(rs.getString("picCover"));
				obj.setUpdateTime(rs.getTimestamp("updateTime"));
				obj.setMer_id(rs.getLong("mer_id"));
				return obj;
			}
		};
	}
	
	public String getChannelName() {
		return channelName;
	}


	public void setChannelName(String channelName) {
		this.channelName = channelName;
	}


	public Date getUpdateTime() {
		return updateTime;
	}
	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}
	public int getStatus() {
		return status;
	}
	public void setStatus(int status) {
		this.status = status;
	}
	public long getSid() {
		return sid;
	}
	public void setSid(long sid) {
		this.sid = sid;
	}
	public String getTitle() {
		return title;
	}
	public void setTitle(String title) {
		this.title = title;
	}
	public String getDescription() {
		return description;
	}
	public void setDescription(String description) {
		this.description = description;
	}
	public String getPicCover() {
		return picCover;
	}
	public void setPicCover(String picCover) {
		this.picCover = picCover;
	}
	public String getContent() {
		return content;
	}
	public void setContent(String content) {
		this.content = content;
	}
	public long getMer_id() {
		return mer_id;
	}
	public void setMer_id(long mer_id) {
		this.mer_id = mer_id;
	}
	public long getChannel_id() {
		return channel_id;
	}
	public void setChannel_id(long channel_id) {
		this.channel_id = channel_id;
	}

	public String getPhotos() {
		return photos;
	}

	public void setPhotos(String photos) {
		this.photos = photos;
	}
	
	
}
